package com.fengye.validation.response;

import lombok.Data;

import java.io.Serializable;

/**
 * @author haiqing.gao
 * @since 2023-12-06 15:23
 */

@Data
public class AjaxResult<T> implements Serializable {

    private Integer code;

    private String message;

    private T data;

    public static AjaxResult<Void> fail(Integer code, String message) {
        AjaxResult<Void> result = new AjaxResult<>();
        result.setCode(code);
        result.setMessage(message);
        return result;
    }
}
